// router.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import MyPage from '../components/MyPage.vue'

Vue.use(VueRouter)

const routes = [
    {
        // 👇 非严格匹配，/my-page/* 都指向 MyPage 页面
        path: '/micro-child/*', // vue-router@4.x path的写法为：'/my-page/:page*'
        name: 'micro-child',
        component: MyPage,
    },
]
const router = new VueRouter({
    mode: 'history',
    // 👇 设置基础路由，子应用可以通过window.__MICRO_APP_BASE_ROUTE__获取基座下发的baseroute，如果没有设置baseroute属性，则此值默认为空字符串
    base: '/',
    routes
})
export default router
